<template>
    <div>
        <van-field label="手机号" placeholder="请输入手机号" v-model="form.mobile"></van-field>
        <van-field label="密码" placeholder="请输入密码" v-model="form.password"></van-field>
        <van-button @click="login">登录</van-button>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                form:{}
            }
        },
        methods: {
            login(){
                this.$axios.post('/smscode/',this.form).then(res=>{
                    console.log(res.data)
                    if(res.data.code == 200){
                        alert(res.data.msg)
                        localStorage.setItem('userid',res.data.userid)
                        localStorage.setItem('mobile',res.data.mobile)
                        this.$router.push('/day15show')
                    }
                })
            }
        },
    }
</script>

<style scoped>

</style>